package cn.iocoder.yudao.module.system.controller.admin.partnerstore.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.time.LocalDate;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;

@Schema(description = "管理后台 - 合伙人管理店铺新增/修改 Request VO")
@Data
public class PartnerStoreSaveReqVO {

    @Schema(description = "主键自增", requiredMode = Schema.RequiredMode.REQUIRED, example = "6534")
    private Long id;

    @Schema(description = "关联合伙人id", example = "28933")
    private Long partnerId;

    @Schema(description = "关联店铺id", example = "28933")
    private Long storeId;

    @Schema(description = "合伙人成本")
    private Long partnerCost;

    @Schema(description = "合伙人类型：1-LP发起人；2-LP合伙人；", example = "2")
    private Integer partnerType;

    @Schema(description = "回本前分润比例%")
    private BigDecimal paybackBeforeProfitRate;

    @Schema(description = "回本后分润比例%")
    private BigDecimal paybackAfterProfitRate;

    @Schema(description = "分润开始日期")
    @NotBlank(message = "分润开始日期不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate shareProfitStartDate;

    @Schema(description = "分润结束日期")
    @NotBlank(message = "分润结束日期不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate shareProfitEndDate;

    @Schema(description = "推荐人类型：1-LP发起人；", example = "1")
    private Integer referrerType;

    @Schema(description = "推荐人分润比例")
    private BigDecimal referrerProfitRate;

}